home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presen…tion Library 4 (Reseller) / Apple Ref. & Pres. Lib.v4.0.iso / 4-Demos / Apple Demos / Tutorials / Display Card 4•8⁄8•24 Training / Display Card 4•8_8•24 Training / background_25934.txt < prev    next >
Text File  |  1990-03-19  |  4KB  |  178 lines

  1. -- background: 25934 from stack: in
  2. -- bmap block id: 26317
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: checkBack
  6. ----- HyperTalk script -----
  7. on fixResponses -- called from openCard on tests 1, 2, and 3
  8.   repeat with r = 1 to the number of cd flds
  9.     if word 1 of the short name of cd fld r = "answer" then
  10.       put word 2 of the short name of cd fld r into rLine
  11.       get line rLine of cd fld "Your Responses"
  12.       if it <> "" then
  13.         put line rLine of cd fld "Your Responses" into cd fld r
  14.       else
  15.         put "" into cd fld r
  16.       end if
  17.     end if
  18.   end repeat
  19. end fixResponses
  20.  
  21. on toggleResponses -- called by mouseup in Answer fields in tests 1-3
  22.   put word 2 of the short name of target into rLine
  23.   repeat with r = 1 to the number of cd flds
  24.     if word 1 of the short name of cd fld r = "Responses" then hide cd fld r
  25.   end repeat
  26.   set the visible of cd fld ("Responses" && rLine) to true
  27. end toggleResponses
  28.  
  29. on chooseResponses -- called by mouseup in Responses fields in tests 1-3
  30.   global inProgress
  31.   put true into inProgress
  32.   put clickline() into temp
  33.   put (word 2 of the short name of target) into rLine
  34.   put line temp of cd fld ("Responses" && rLine) into cd fld ("Answer" && rLine)
  35.   put cd fld ("Answer" && rLine) into line rLine of cd fld "Your Responses"
  36.   hide cd fld ("Responses" && rLine)
  37.   put temp into line rLine of cd fld "Your Answers"
  38. end chooseResponses
  39.  
  40. on ScoreReview
  41.   global memolist, testnumber, correct, incorrect
  42.   put "0" into correct
  43.   put "0" into incorrect
  44.   answer "Do you want to review your scores?" with "No" or "Yes"
  45.   if it is "No" then go card "test 1"
  46.   else
  47.     put 1 into s
  48.     repeat with s = 1 to the number of items in memolist
  49.       if item s of memolist = "true" then add 1 to correct
  50.       else add 1 to incorrect
  51.       add 1 to s
  52.     end repeat
  53.     go card "test 12"
  54.     put correct into line testNumber of cd fld "correct"
  55.     put incorrect into line testNumber of cd fld "incorrect"
  56.   end if
  57. end ScoreReview
  58.  
  59.  
  60.  
  61.  
  62. -- part 6 (field)
  63. -- low flags: 01
  64. -- high flags: 0000
  65. -- rect: left=128 top=80 right=295 bottom=506
  66. -- title width / last selected line: 0
  67. -- icon id / first selected line: 0 / 0
  68. -- text alignment: 0
  69. -- font id: 156
  70. -- text size: 14
  71. -- style flags: 0
  72. -- line height: 16
  73. -- part name: cardtext
  74.  
  75.  
  76. -- part 4 (field)
  77. -- low flags: 01
  78. -- high flags: 0000
  79. -- rect: left=128 top=0 right=21 bottom=507
  80. -- title width / last selected line: 0
  81. -- icon id / first selected line: 0 / 0
  82. -- text alignment: 0
  83. -- font id: 21
  84. -- text size: 18
  85. -- style flags: 10240
  86. -- line height: 19
  87. -- part name: Title
  88.  
  89.  
  90. -- part 5 (field)
  91. -- low flags: 01
  92. -- high flags: 0000
  93. -- rect: left=128 top=23 right=45 bottom=508
  94. -- title width / last selected line: 0
  95. -- icon id / first selected line: 0 / 0
  96. -- text alignment: 0
  97. -- font id: 21
  98. -- text size: 18
  99. -- style flags: 0
  100. -- line height: 20
  101. -- part name: cardTitle
  102.  
  103.  
  104. -- part 10 (field)
  105. -- low flags: 01
  106. -- high flags: 0000
  107. -- rect: left=127 top=64 right=82 bottom=512
  108. -- title width / last selected line: 0
  109. -- icon id / first selected line: 0 / 0
  110. -- text alignment: 0
  111. -- font id: 158
  112. -- text size: 14
  113. -- style flags: 0
  114. -- line height: 16
  115. -- part name: subHeader
  116.  
  117.  
  118. -- part 9 (field)
  119. -- low flags: 81
  120. -- high flags: 0000
  121. -- rect: left=0 top=330 right=342 bottom=115
  122. -- title width / last selected line: 0
  123. -- icon id / first selected line: 0 / 0
  124. -- text alignment: 0
  125. -- font id: 3
  126. -- text size: 9
  127. -- style flags: 0
  128. -- line height: 9
  129. -- part name: cardName
  130.  
  131.  
  132. -- part 16 (field)
  133. -- low flags: 81
  134. -- high flags: 0000
  135. -- rect: left=0 top=330 right=342 bottom=96
  136. -- title width / last selected line: 0
  137. -- icon id / first selected line: 0 / 0
  138. -- text alignment: 0
  139. -- font id: 3
  140. -- text size: 9
  141. -- style flags: 0
  142. -- line height: 9
  143. -- part name: cardName
  144.  
  145.  
  146. -- part 21 (button)
  147. -- low flags: 00
  148. -- high flags: A000
  149. -- rect: left=449 top=3 right=18 bottom=510
  150. -- title width / last selected line: 0
  151. -- icon id / first selected line: 0 / 0
  152. -- text alignment: 0
  153. -- font id: 3
  154. -- text size: 10
  155. -- style flags: 2048
  156. -- line height: 13
  157. -- part name: Contents
  158. ----- HyperTalk script -----
  159. on mouseUp
  160.   visual effect dissolve
  161.   go card "content 0"
  162. end mouseUp
  163.  
  164.  
  165.  
  166. -- part 23 (field)
  167. -- low flags: 00
  168. -- high flags: 0000
  169. -- rect: left=5 top=319 right=336 bottom=93
  170. -- title width / last selected line: 0
  171. -- icon id / first selected line: 0 / 0
  172. -- text alignment: 0
  173. -- font id: 20
  174. -- text size: 12
  175. -- style flags: 0
  176. -- line height: 16
  177. -- part name: Tom's Field
  178.